
function [gr_blk_den gr_blk_map gr_blk_vt] = utl_cal_log_fir_blk(blk_vt)
    function h = gen_log_filter(sigma, hsize)
        K = 2 * hsize + 1;
        h = zeros(K,K);
        for x = 1:K
            for y = 1:K
                u = x - hsize - 1;
                v = y - hsize - 1;
                h(x,y) = (1/(2*sigma^6)) * (u^2 + v^2 - 2*sigma^2) * exp(-(u^2 + v^2)/(2*sigma^2));
            end
        end
        %         h = h - mean(h(:));
        %         h = h * sigma^2;
    end
[blk_rows blk_cols num_blk] = size(blk_vt);
gr_blk_map = zeros(size(blk_vt));
gr_blk_vt = zeros(num_blk);
gr_blk_den = zeros(size(blk_vt));
for i = 1:num_blk
    iblk = blk_vt(:,:,i);
    [fx_blk fy_blk] = imgradient(iblk);
    mg_blk = sqrt(fx_blk.^2 + fy_blk.^2);
    gr_blk_vt(i) = mean(mg_blk(:));
    gr_blk_map(:,:,i) = mg_blk;
    gr_blk_den(:,:,i) = gr_blk_vt(i);
end
end